package appapi.Vo.brider;

import appapi.entity.Zhongjiao.SceneEquipmentDto;
import appapi.entity.bridge.SceneEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 请求对象
 *
 * @author luocheng
 * @version 1.0
 * @date 2023/09/20 10:55
 */
@ApiModel("场景添加请求对象")
@Data
public class SceneVo implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "ID 新增不传")
    private Long sceneId;

    @ApiModelProperty(value = "场景编号")
    @TableField(value = "sceneNo")
    private String sceneNo;

    @ApiModelProperty(value = "场景名称")
    private String sceneName;

    @ApiModelProperty(value = "场景类别:桥墩，桥面")
    private String sceneType;

    @ApiModelProperty(value = "设备数量")
    @TableField(value = "scene_count")
    private Integer sceneCount;

    /**
     * 所属项目
     */
    @ApiModelProperty(value = "所属项目")
    private Long projId;

    /**
     * 场景摘要
     */
    @ApiModelProperty(value = "场景摘要")
    private String sceneSummary;


    @ApiModelProperty(value = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sceneStart;

    @ApiModelProperty(value = "场景设备列表")
    private List<SceneDeviceVo> list;

    public SceneEntity Entity() {
        SceneEntity entity = new SceneEntity();
        BeanUtils.copyProperties(this, entity);
        return entity;
    }

}
